#!/Users/hepeng/.pyenv/shims/python
# -*- coding: utf-8 -*-
# @Time    : 2020/9/1 2:46 下午
# @Author  : hepeng
# @Site    : 
# @File    : LogFactory.py

from __future__ import unicode_literals
import logging, os
from logging import config


class LoggingHandler(object):
    __solt__ = ['logger']

    def __init__(self, cls_name=None):
        log_path = os.path.join(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'conf'), 'logging.config')
        config.fileConfig(log_path)
        self.logger = logging.getLogger(cls_name)

    def getlogger(self):
        return self.logger
